 nike.util.UrlUtil.getParameter = function(c, b) {
        b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var a = "[\\?&]" + b + "=([^&#]*)";
        var e = new RegExp(a);
        var d = e.exec(c);
        if (d == null) {
            return ""
        } else {
            return d[1]
        }
    };
    nike.util.UrlUtil.addParameter = function(b, a, d) {
        var c = b.indexOf(a + "=") > -1 ? true : false;
        if (!c) {
            if (b.indexOf("?") >= 0) {
                b += "&"
            } else {
                b += "?"
            }
            b += (a + "=" + d)
        }
        return b
    };
    nike.util.UrlUtil.getLValue = function(b, a) {
        if (b.indexOf(a) > 0) {
            b = b.substring(b.indexOf(a) + a.length, b.length);
            if (b.indexOf("/") > 0) {
                b = b.substring(0, b.indexOf("/"))
            }
            return b
        } else {
            return ""
        }
    };
    nike.util.UrlUtil.getExternalReferrer = function() {
        var f;
        var b;
        var e;
        var c;
        $.url.setUrl(window.location.href);
        e = d($.url.attr("host"));
        f = decodeURIComponent($.url.param("ref"));
        if (f == "undefined" || f == undefined || f.length == 0) {
            var a = document.referrer;
            nike.log("No existing referrer found so pulling it off the document: " + a);
            f = a
        } else {
            nike.log("Using the referrer found on the page already: " + f)
        }
        if (f) {
            $.url.setUrl(f);
            b = d($.url.attr("host"));
            if (b != e) {
                c = f
            } else {
                nike.log("The referrer (" + f + ") was found to be on the same top level domain as the current request, so skipping it.")
            }
        } else {
            nike.log("No document referrer found.")
        }
        if (c == undefined || c == "undefined") {
            c = ""
        }
        return c;

        function d(i) {
            var g;
            var h = "";
            if (i != null && i !== undefined) {
                g = i.split(".");
                if (g.length > 2) {
                    h = g[g.length - 2] + "." + g[g.length - 1]
                } else {
                    h = i
                }
            }
            return h
        }
    };
    nike.util.UrlUtil.parseUrlParams = function(c, h) {
        var e, a;
        var f = g(c);
        var d;
        if (f.length > 0) {
            d = f.split("&");
            for (e = 0, a = d.length;
            e < a;
            e++) {
                var b = d[e].split("=");
                if (b.length == 2) {
                    h[decodeURIComponent(b[0])] = decodeURIComponent(b[1])
                }
            }
        }
        function g(l) {
            var i = "";
            var k = 0;
            var j = l != undefined ? l.length : 0;
            if (j > 0) {
                while (k < j && (l.charAt(k) === "?" || l.charAt(k) === "#")) {
                    k++
                }
                if (k < j) {
                    i = l.substring(k)
                }
            }
            return i
        }
    };